1 <?php
2 session_start();
3 error_reporting(
0);
4 include(
'includes/config.php');
5 if
(isset($_POST['submit1']))
6 {
7 $fname=$_POST[
'fname'];
8 $email=$_POST[
'email'];
9 $mobile=$_POST[
'mobileno'];
10 $subject=$_POST[
'subject'];
11 $description=$_POST[
'description'];
12 $sql=
"INSERT INTO tblenquiry(FullName,EmailId,MobileNumber,Subject,Description) VALUES(:fname,:email,:mobile,:subject,:description)";
13 $query = $dbh->prepare($sql);
14 $query->bindParam(
':fname',$fname,PDO::PARAM_STR);
15 $query->bindParam(
':email',$email,PDO::PARAM_STR);
16 $query->bindParam(
':mobile',$mobile,PDO::PARAM_STR);
17 $query->bindParam(
':subject',$subject,PDO::PARAM_STR);
18 $query->bindParam(
':description',$description,PDO::PARAM_STR);
19 $query->execute();
20 $lastInsertId = $dbh->lastInsertId();

21 if
($lastInsertId)
22 {
23 $msg=
"Enquiry Successfully submited";
24 }

25 else

26 {
27 $error=
"Something went wrong. Please try again";
28 }
29
30 }
31
32 ?>
33 <!DOCTYPE HTML>
34 <html>
35 <head>
36 <title>TMS | Tourism Management System</title>
37 <meta name=
"viewport" content="width=device-width, initial-scale=1">
38 <meta http-equiv=
"Content-Type" content="text/html; charset=utf-8" />
39 <meta name=
"keywords" content="Tourism Management System In PHP" />
40 <script type=
"applijewelleryion/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
41 <link href=
"css/bootstrap.css" rel='stylesheet' type='text/css' />
42 <link href=
"css/style.css" rel='stylesheet' type='text/css' />
43 <link href=
'//fonts.googleapis.com/css?family=Open+Sans:400,700,600' rel='stylesheet' type='text/css'>
44 <link href=
'//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
45 <link href=
'//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
46 <link href=
"css/font-awesome.css" rel="stylesheet">
47 <!-- Custom Theme files -->
48 <script src=
"js/jquery-1.12.0.min.js"></script>
49 <script src=
"js/bootstrap.min.js"></script>
50 <!--animate-->
51 <link href=
"css/animate.css" rel="stylesheet" type="text/css" media="all">
52 <script src=
"js/wow.min.js"></script>
53     <script>
54          
new WOW().init();
55     </script>
56   <style>
57         .errorWrap {
58     padding: 10px;
59     margin:
0 0 20px 0;
60     background: #fff;
61     border-left: 4px solid #dd3d36;
62     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
63     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
64 }
65 .succWrap{
66     padding: 10px;
67     margin:
0 0 20px 0;
68     background: #fff;
69     border-left: 4px solid #5cb85c;
70     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
71     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
72 }
73         </style>
74 </head>
75 <body>
76 <!-- top-header -->
77 <div
class="top-header">
78 <?php include(
'includes/header.php');?>
79 <div
class="banner-1 ">
80     <div
class="container">
81         <h1
class="wow zoomIn animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: zoomIn;">TMS-Tourism Management System</h1>
82     </div>
83 </div>
84 <!--- /banner-
1 ---->
85 <!--- privacy ---->
86 <div
class="privacy">
87     <div
class="container">
88         <h3
class="wow fadeInDown animated animated" data-wow-delay=".5s" style="visibility: visible; animation-delay: 0.5s; animation-name: fadeInDown;">Enquiry Form Password</h3>
89         <form name=
"enquiry" method="post">
90          <?php
if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
91                 
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
92     <p style=
"width: 350px;">
93         
94             <b>Full name</b> <input type=
"text" name="fname" class="form-control" id="fname" placeholder="Full Name" required="">
95     </p>
96 <p style=
"width: 350px;">
97 <b>Email</b> <input type=
"email" name="email" class="form-control" id="email" placeholder="Valid Email id" required="">
98     </p>
99
100     <p style=
"width: 350px;">
101 <b>Mobile No</b> <input type=
"text" name="mobileno" class="form-control" id="mobileno" maxlength="10" placeholder="10 Digit mobile No" required="">
102     </p>
103
104     <p style=
"width: 350px;">
105 <b>Subject</b> <input type=
"text" name="subject" class="form-control" id="subject" placeholder="Subject" required="">
106     </p>
107     <p style=
"width: 350px;">
108 <b>Description</b> <textarea name=
"description" class="form-control" rows="6" cols="50" id="description" placeholder="Description" required=""></textarea>
109     </p>
110
111             <p style=
"width: 350px;">
112 <button type=
"submit" name="submit1" class="btn-primary btn">Submit</button>
113             </p>
114             </form>
115
116         
117     </div>
118 </div>
119 <!--- /privacy ---->
120 <!--- footer-top ---->
121 <!--- /footer-top ---->
122 <?php include(
'includes/footer.php');?>
123 <!-- signup -->
124 <?php include(
'includes/signup.php');?>
125 <!--
//signu -->
126 <!-- signin -->
127 <?php include(
'includes/signin.php');?>
128 <!--
//signin -->
129 <!-- write us -->
130 <?php include(
'includes/write-us.php');?>
131 </body>
132 </html>


Gõ tìm kiếm nhanh...